package com.rescue.mapper;

import com.github.pagehelper.Page;
import com.rescue.forum.entity.UserIntegralRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;

@Mapper
public interface UserIntegralRecordMapper {

    Page<UserIntegralRecord> page(LocalDateTime start,
                                  LocalDateTime end,
                                  Integer userId);

    @Insert("insert into user_integral_record (user_id, oper_type, integral, create_time, oper_type_name) " +
            "value (#{userId}, #{operType}, #{integral}, #{createTime}, #{operTypeName})")
    void insert(UserIntegralRecord record);
}
